import request from '/@/utils/request'
import {prefix} from '/@/api/qn'

// 获取列表
export function pageList(data: object) {
    return request({
        url: prefix + '/iQnQuestion/pageList',
        method: 'post',
		data
    })
}


// 创建
export function create(data: object) {
    return request({
        url: prefix + '/iQnQuestion/create',
        method: 'post',
        data
    })
}

// 编辑
export function update(data: object) {
    return request({
        url: prefix + '/iQnQuestion/update',
        method: 'post',
        data
    })
}

// 根据id获取
export function get(id) {
    return request({
        url: prefix + '/iQnQuestion/get/'+ id,
        method: 'get'
    })
}
// 移除
export function remove(id) {
    return request({
        url: prefix + '/iQnQuestion/remove/'+ id,
        method: 'get'
    })
}

// 修改状态
export function updateStatus(data: object) {
    return request({
        url: prefix + '/iQnQuestion/updateStatus',
        method: 'get',
		params:data
		
    })
}

// 获取试卷题目列表
export function getQuestionsByPaperId(data: object) {
    return request({
        url: prefix + '/iQnQuestion/getQuestionsByPaperId',
        method: 'get',
		params:data
		
    })
}

// 获取列表
export function getList(data: object) {
    return request({
        url: prefix + '/iQnQuestion/getList',
        method: 'post',
        data
    })
}

// 保存选中的题目
export function savePaperQuestions(data: object) {
    return request({
        url: prefix + '/iQnQuestion/savePaperQuestions',
        method: 'post',
        data
    })
}
